package dimensional.traveler.server.model;

import dimensional.traveler.shared.model.CharacterClassDTO;

public class CharacterClass {

	private String id;
	private String name = "";
	private String description = "";
	private boolean enabled = true;
	private Faction faction;

	public CharacterClass(String id, String name, String description) {
		this.id = id;
		this.name = name;
		this.description = description;
	}

	public String getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getDescription() {
		return description;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public Faction getFaction() {
		return faction;
	}

	public void setFaction(Faction faction) {
		this.faction = faction;
	}

	public CharacterClassDTO toCharacterClassDTO() {
		CharacterClassDTO dto = new CharacterClassDTO();

		dto.setId(this.getId());
		dto.setDescription(this.getDescription());
		dto.setFactionDescription(this.getFaction().getDescription());
		dto.setName(this.getName());
		dto.setEnabled(this.isEnabled());

		return dto;
	}

}
